package cn.dnui_yxk801.dnuifood_16110100801.service;

import java.util.List;

import cn.dnui_yxk801.dnuifood_16110100801.bean.CommentsBean;
import cn.dnui_yxk801.dnuifood_16110100801.bean.ResultBean;
import cn.dnui_yxk801.dnuifood_16110100801.bean.UserBean;
import cn.dnui_yxk801.dnuifood_16110100801.bean.CollectInfoBean;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

public interface UserService {
    @GET("userLogin.do")
    Call<UserBean> doLogin(@Query("username")String username,
                           @Query("userpass")String password);
    @GET("userRegister.do")
    Call<ResultBean> doRegist(@Query("username")String username,
                              @Query("userpass")String password,
                              @Query("mobilenum")String mobilenum,
                              @Query("address")String address,
                              @Query("comment")String comment);
    @GET("userCollectFood.do")
    Call<ResultBean> userCollectFood(@Query("user_id")String userid,@Query("food_id")String foodid);
    @GET("userCollectShop.do")
    Call<ResultBean> userCollectShop(@Query("user_id")String userid,@Query("shop_id")String shopid);
    @GET("getAllUserCollection.do")
    Call<List<CollectInfoBean>> getAllUserCollection(@Query("user_id")String user_id, @Query("flag")String flag);
    @GET("getUserById.do")
    Call<UserBean> getUserById(@Query("user_id")String userid);
    @GET("updateUserById.do")
    Call<ResultBean> updateUserById(@Query("user_id")String userid,@Query("username")String username,@Query("userpass")String userpass,@Query("mobilenum")String mobilenum,@Query("address")String address);
    @GET("getAllOrdersByUser.do")
    Call<List<CommentsBean>> getAllOrdersByUser(@Query("user_id")String userid);
    @GET("getAllCommentsByUser.do")
    Call<List<CommentsBean>> getAllCommentsByUser(@Query("user_id")String userid);
    @GET("insertComment.do")
    Call<ResultBean> insertComment(@Query("item_id")String item_id,@Query("content")String content);
    @GET("updateComment.do")
    Call<ResultBean> updateComment(@Query("item_id")String item_id,@Query("content")String content);
    @GET("deleteComment.do")
    Call<ResultBean> deleteComment(@Query("item_id")String item_id);
}
